#include "ocamera.h"

OCamera::OCamera():
    m_xPos(0),
    m_yPos(0),
    m_zPos(0),
    m_xLookAt(0),
    m_yLookAt(0),
    m_zLookAt(0),
    m_camera(0)
{
}

float OCamera::xPos() const{
    return m_camera->getPosition().x;
}

void OCamera::setXPos(float value){
    m_xPos = value;
}

float OCamera::yPos() const{
    return m_camera->getPosition().y;
}

void OCamera::setYPos(float value){
    m_yPos = value;
}

float OCamera::zPos() const{
    return m_camera->getPosition().z;
}

void OCamera::setZPos(float value){
    m_zPos = value;
}

void OCamera::applyPos(){
    m_camera->setPosition(m_xPos, m_yPos, m_zPos);
}

float OCamera::xLookAt() const{
    return m_xLookAt;
}

void OCamera::setXLookAt(float value){
    m_xLookAt = value;
}

float OCamera::yLookAt() const{
    return m_yLookAt;
}

void OCamera::setYLookAt(float value){
    m_yLookAt = value;
}

float OCamera::zLookAt() const{
    return m_zLookAt;
}

void OCamera::setZLookAt(float value){
    m_zLookAt = value;
}

void OCamera::applyLookAt(){
    m_camera->lookAt(m_xLookAt, m_yLookAt, m_zLookAt);
}

float OCamera::nearClipDistance() const{
    return m_camera->getNearClipDistance();
}

void OCamera::setNearClipDistance(float value){
    m_camera->setNearClipDistance(value);
}

void OCamera::setNativeCamera(Ogre::Camera* nativeCamera){
    m_camera = nativeCamera;
}

Ogre::Camera* OCamera::getNativeCamera(){
    return m_camera;
}
